Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify LinkSecret handling #237

Merged
merged 2 commits into from
Sep 5, 2023

Conversation

andrewwhitehead
Copy link
Member

This updates to anoncreds-clsignatures 0.2.2 to take advantage of simple conversion from the link secret to a BigNumber. I don't think there's any reason to support conversion from ClLinkSecret to LinkSecret anymore as the build_credential_values method is updated to use LinkSecret.

use crate::cl::{bn::BigNumber, Prover as CryptoProver};
use crate::error::ConversionError;

pub struct LinkSecret(pub(crate) BigNumber);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to derive zeroize on this? It was not done before due to Ursa but it might be possible now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For version 0.2.2 the crate is using openssl's secure context for big numbers, which as I understand it zeroizes the entire buffer before it's released. So this type could implement ZeroizeOnDrop, but probably not Zeroize.

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
@andrewwhitehead andrewwhitehead merged commit 53c1b03 into hyperledger:main Sep 5, 2023
25 checks passed
@andrewwhitehead andrewwhitehead deleted the upd/cl-022 branch September 5, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants